<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8" />
    <title>title</title>
</head>
<body>
    <div id="navbar"></div>
    <script>
    fetch('/static/nav.html')  // 确保 nav.html 放在 static/ 目录下
        .then(response => response.text())
        .then(data => {
            document.getElementById('navbar').innerHTML = data;
        })
        .catch(err => console.error('无法加载导航栏:', err));
    </script>
    <h1 style="text-align: center;">欢迎来到农业管理系统</h1>
</body>
</html>